import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
class node1{
    int x;
    int y;
    char n;
    String s;
    node1(int x,int y,char n,String s){
        this.x=x;
        this.y=y;
        this.n=n;
        this.s=s;
    }
}
public class demo04 {
    public static int[] dx={1,0,0,-1};
    public static int[] dy={0,-1,1,0};
    public static char[] d={'D','L','R','U'};
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        String[] arr1=new String[n];
        char[][] arr=new char[n][m];
        for (int i = 0; i < n; i++) {
            arr1[i]=sc.next();
            arr[i]=arr1[i].toCharArray();
        }
        Queue<node1> queue=new LinkedList<>();
        node1 tmp=new node1(0,0,'2',"");
        arr[0][0]=tmp.n;
        queue.offer(tmp);
        while (!queue.isEmpty()){
            node1 tmp1=queue.poll();
            for (int k = 0; k < 4; k++) {
                int i1=tmp1.x+dx[k];
                int j1=tmp1.y+dy[k];
                String s1= tmp1.s;
                if(i1>=0&&i1<n&&j1>=0&&j1<m){
                    if(arr[i1][j1]=='0'){
                        arr[i1][j1]=(char)(tmp1.n+1);
                        node1 tmp2=new node1(i1,j1,arr[i1][j1],s1+d[k]);
                        if(i1==n-1&&j1==m-1){
                            System.out.println(tmp2.s);
                            return;
                        }
                        queue.offer(tmp2);
                    }
                }
            }
        }
    }
}